<?php echo $this->Form->create("Property", array("class" => "form", "action" => "edit/" . $this->data['Property']['id'])); ?>
<?php echo $this->Form->hidden('Property.id'); ?>
<?php echo $this->Form->hidden('Property.proyect_id'); ?>
<?php echo $this->Form->input('Property.nombre', array('label' => 'Nombre', 'class' => 'required')); ?>
<?php echo $this->Form->input('Property.matricula', array('label' => 'Matrícula', 'class' => '')); ?>
<?php echo $this->Form->input('Property.cedulaCatastral', array('label' => 'cedulaCatastral', 'class' => '')); ?>
<?php echo $this->Form->input('Property.area', array('label' => 'Área', 'class' => 'required')); ?>
<?php echo $this->Form->input('Property.area_permuta',array('label'=>'Área permuta','class' =>'required'    ));?>
<?php
echo $this->Ajax->observeField('PropertyDepartamentId', array(
    'url' => array('action' => 'select'),
    'frequency' => 0.2,
    'update' => 'ciudades'
        )
);
?>
<?php echo $this->Form->input('Property.departament_id', array('label' => 'Departamento', 'empty' => 'Seleccione departamento', 'value' => $this->data['Departament']['id'])); ?>

<div id="ciudades">
    <?php echo $this->Form->input('Property.city_id', array('label' => 'Municipio', 'class' => '')); ?>
</div>

<?php echo $this->Form->end("Guardar") ?>
<br>
<?php
echo $this->Ajax->link($this->Html->image('regresar.gif', array('width' => '30', 'heigth' => '30', 'alt' => 'Regresar', 'title' => 'regresar')), array('controller' => 'Properties', 'action' => 'index'), array('update' => 'content', 'indicator' => 'loading', 'escape' => false));
?>
